import request from '@/utils/request'

const api_url = '/admin/user'

export default {
  // 条件分页查询用户
  getPageList(page, limit, searchObj) {
    return request({
      url: `${api_url}/${page}/${limit}`,
      method: 'get',
      params: searchObj
    })
  },
  // 更新用户状态
  lock(userId, status) {
    return request({
      url: `${api_url}/lock/${userId}/${status}`,
      method: 'get'
    })
  },
  // 用户详情
  show(userId) {
    return request({
      url: `${api_url}/show/${userId}`,
      method: 'get'
    })
  },
  // 认证审批
  approval(userId, authStatus) {
    return request({
      url: `${api_url}/approval/${userId}/${authStatus}`,
      method: 'get'
    })
  }
}
